Skip to content

Conversation

@eval-exec
Copy link
Collaborator

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary:

What is changed and how it works?

Proposal: xxx

What's Changed:

Related changes

  • PR to update owner/repo:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code ci-runs-only: [ quick_checks,linters ]

Side effects

  • Performance regression
  • Breaking backward compatibility

Release note

None: Exclude this PR from the release note.
Title Only: Include only the PR title in the release note.
Note: Add a note under the PR title in the release note.

@eval-exec eval-exec requested a review from a team as a code owner March 1, 2025 10:40
@eval-exec eval-exec requested review from doitian and removed request for a team March 1, 2025 10:40
@eval-exec eval-exec force-pushed the exec/public_address_sepearate_config_and_discovered branch 2 times, most recently from 88421c6 to 678c9c2 Compare March 1, 2025 11:02
@eval-exec eval-exec changed the title ckb_network: prevent EventHandler::handle_error removed user configured public_addrs Prevent EventHandler::handle_error removed user configured public_addrs Mar 1, 2025
@eval-exec eval-exec changed the title Prevent EventHandler::handle_error removed user configured public_addrs Prevent EventHandler::handle_error remove user configured public_addrs Mar 1, 2025
@eval-exec eval-exec changed the title Prevent EventHandler::handle_error remove user configured public_addrs Prevent EventHandler::handle_error remove user configured [network].public_addresses Mar 1, 2025
@eval-exec eval-exec force-pushed the exec/public_address_sepearate_config_and_discovered branch from 678c9c2 to 4518a88 Compare March 6, 2025 06:17
@eval-exec eval-exec force-pushed the exec/public_address_sepearate_config_and_discovered branch from 4518a88 to 965ea17 Compare March 6, 2025 06:27
@github-actions
Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the stale To be closed due to a lack of activity label Apr 21, 2025
@github-actions
Copy link

github-actions bot commented May 1, 2025

This PR was closed because it has been stalled for 10 days with no activity.

@github-actions github-actions bot closed this May 1, 2025
doitian added a commit that referenced this pull request Jun 6, 2025
feat: add a hole punching protocol try use on nat traversal

closes #4824 #4766

This PR introduces a protocol to coordinate node connection behavior, attempting to perform TCP traversal through coordination:

1. Removed the `try dial observe address` behavior.
2. The protocol currently does not support the wasm target and does not support establishing WebSocket protocol connections.
3. The protocol has only three messages, with the following behavior:
   1. Schedule finding peer IDs from the peer store that want to establish a connection and broadcasting their possible listening addresses.
   2. The node receives a Request message and determines if the target object is itself.
      1. If the `to` object is itself, it returns a Delivered message.
      2. If the `to` object is not itself, it broadcasts the route and ttl modified.
   3. The node receives a Delivered message response.
      1. If the `from` object is itself, it starts a TCP connection request and responds with a Sync message
      2. If the `from` object is not itself, it modifies the route and ttl and propagates the message to the next router object.
   4. The node receives a Sync message response.
      1. If the `to` object is itself, it starts a TCP connection request.
      2. If the `to` object is not itself, it propagates the message to the next router object.

```mermaid
sequenceDiagram
    participant A as Initiator Node A
    participant B as Relay Node B
    participant C as Target Node C

    autonumber

    A->>B: ConnectionRequest
    B->>C: Forward(ConnectionRequest)
    activate C
    C-->>C: Validate Target
    C->>B: ConnectionRequestDelivered (incl. Observed Addr)
    deactivate C
    B->>A: Forward(ConnectionRequestDelivered)
    activate A
    A-->>A: Process Reply (Store Observed Addr)
    Note right of A: Delay start early NAT<br/>traversal attempt here (ttl/2)
    A->>B: ConnectionSync
    deactivate A
    B->>C: Forward(ConnectionSync)

    par Start NAT Traversal & Direct Connection Attempt
        activate A
        A-->>A: Start NAT Traversal
        A-->>C: Direct Connection Attempt (e.g., TCP Hole Punching)
        deactivate A
    and
        activate C
        C-->>C: Start NAT Traversal
        C-->>A: Direct Connection Attempt (e.g., TCP Hole Punching)
        deactivate C
    end
```

Co-Authored-By: driftluo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale To be closed due to a lack of activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant